﻿<%@ Page Language="C#" MasterPageFile="~/Task/Task.master" AutoEventWireup="true"
    CodeFile="EvaluateList.aspx.cs" Inherits="Task_EvaluateList" Title="Untitled Page"
    StylesheetTheme="Content" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_StartDate" runat="server" Format="yyyy-MM-dd"
        TargetControlID="StartDate" Animated="false">
    </ajaxToolkit:CalendarExtender>
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_EndDate" runat="server" Format="yyyy-MM-dd"
        TargetControlID="EndDate" Animated="false">
    </ajaxToolkit:CalendarExtender>
    <ul class="topmenu">
        <li>选择日期：<asp:TextBox ID="StartDate" runat="server" Width="90px"></asp:TextBox>
            至
            <asp:TextBox ID="EndDate" runat="server" Width="90px"></asp:TextBox></li>
        <li>
            <asp:LinkButton ID="ButtonSearch" runat="server" OnClick="ButtonSearch_Click" Text="查询" /></li>
    </ul>
    <div>
        <asp:GridView ID="UserGrid" runat="server" AutoGenerateColumns="False" OnRowDataBound="UserGrid_RowDataBound"
            DataKeyNames="TaskID" OnSelectedIndexChanging="UserGrid_SelectedIndexChanging"
            Caption="<span>任务列表</span>">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle Width="30px" />
                    <ItemTemplate>
                        <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="任务名称">
                    <ItemTemplate>
                        [<%# GetTaskTypeName((int)Eval("TaskType")) %>]
                        <asp:HyperLink ID="Title" runat="server" NavigateUrl='<%# Eval("TaskId","ViewTask.aspx?RootId={0}") %>'
                            Text='<%# GetTitle((string)Eval("Title")) %>'>'></asp:HyperLink>
                        [<%# Eval("CreateUser") %>]
                        <asp:Image ID="Lock" runat="server" ImageAlign="AbsMiddle" ImageUrl="../Images/Lock.gif"
                            ToolTip="任务已锁定" Visible='<%# (bool)Eval("Locked") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="截止时间">
                    <ItemStyle HorizontalAlign="Center" Width="80px" />
                    <ItemTemplate>
                        <%# Eval("StartDate", "{0:d}") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="未审核">
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%# GetUserCount((int)Eval("TaskId")) %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemStyle HorizontalAlign="Right" />
                    <ItemTemplate>
                        <asp:HyperLink ID="ButtonEvaluate" runat="server" NavigateUrl='<%# Eval("TaskId","EvaluateTask.aspx?RootId={0}") %>'
                            Visible='<%# !(bool)Eval("Locked") %>'>审核</asp:HyperLink>
                        <asp:LinkButton ID="ButtonLock" runat="server" CommandName="Select" Text='<%# GetLockText((bool)Eval("Locked")) %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <div style="padding: 4px;">
            <div style="float: left">
                <asp:Label ID="lbGridInfo" runat="server"></asp:Label>
            </div>
            <div style="float: right">
                <asp:LinkButton ID="btnFirst" runat="server" CommandArgument="First" CommandName="Page"
                    OnClick="btnFirst_Click">首页</asp:LinkButton>
                <asp:LinkButton ID="btnPrev" runat="server" CommandArgument="Prev" CommandName="Page"
                    OnClick="btnPrev_Click">上一页</asp:LinkButton>
                <asp:LinkButton ID="btnNext" runat="server" CommandArgument="Next" CommandName="Page"
                    OnClick="btnNext_Click">下一页</asp:LinkButton>
                <asp:LinkButton ID="btnLast" runat="server" CommandArgument="Last" CommandName="Page"
                    OnClick="btnLast_Click">末页</asp:LinkButton>
                转到：第
                <asp:DropDownList ID="JumpList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="JumpList_SelectedIndexChanged">
                </asp:DropDownList>
                页
            </div>
        </div>
    </div>
</asp:Content>
